<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>欢迎登陆轻松办公系统</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <script type="text/javascript" src="js/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
        <link rel="stylesheet" href="css/min.css" />
        <script type="text/javascript" src="js/min.js"></script>
        <script type="text/javascript" src="content/settings/main.js"></script>
	  	<link rel="stylesheet" href="content/settings/style.css" />
	  	<style type="text/css">
	  		a{text-decoration: none;}
	  	</style>
	  	<script type="text/javascript">
			$(function(){
				// 指定事件处理函数
				$("[name=powerIds]").click(function(){
					// 当选中或取消一个权限时，也同时选中或取消所有的下级权限
					$(this).siblings("ul").find("input").attr("checked", this.checked);
					//$(this).attr();
					// 当选中一个权限时，也要选中所有的直接上级权限
					if(this.checked == true){
						$(this).parents("li").children("input").attr("checked", true);
					}
				});
			});
		</script>
    </head>
    <body>
  <div class="settings" id="settings">
        <div class="wrapper">
            <div class="grid3">
                <div class="titre">背景色</div>
                <a href="url(css/img/bg.html" class="backgroundChanger active" title="White"></a>
                <a href="url(css/img/dark-bg.html" class="backgroundChanger dark" title="Dark"></a>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <a class="settingbutton" href="#"></a>
    </div>        
        <!--              
                HEAD
         --> 
         <!--==================================登录头部分显示的部分（信息）============================================-->
        <div id="head">
            <div class="left">
                <a href="#" class="button profile"><img src="img/icons/top/huser.png" alt="" /></a>
                	你好：
                <a href="#">${sessionScope.user1.user_loginName }</a>
                &nbsp;||&nbsp;
                <a href="userAction_logout" onclick="return confirm('确定注销系统吗？')">注销</a>
            </div>
            <div class="right">
                <form action="#" id="search" class="search placeholder">
                    <label>你要找的东西 ?</label>
                    <input type="text" value="" name="q" class="text"/>
                    <input type="submit" value="rechercher" class="submit"/>
                </form>
            </div>
        </div>
        <!--            
                SIDEBAR
         --> 
        <!--=============================== 左侧要显示的数据（菜单）====================================  -->
        <div id="sidebar">
        	<ul>
        		<li>
        			<a href="${pageContext.request.contextPath }/index.jsp"><img src="${pageContext.request.contextPath }/img/icons/menu/home.png" alt="" />返回首页</a>
        		</li>
      			<s:iterator value="#application.topPowerList">
      			<s:if test="#session.user1.hasPowerByName(power_name)">
	       			<li>
	       				<a href="#"><img src="img/icons/menu/${power_name }.png" alt="" />${power_name }</a>
	                    <ul>
	                    	<s:iterator value="power_children">
	                    	<s:if test="#session.user1.hasPowerByName(power_name)">
	                        		<li>
	                        			<a href="${pageContext.request.contextPath }${power_url }">${power_name }</a>
	                        		</li>
	                        </s:if>
	              			</s:iterator>
	                    </ul>
	                 </li>
	            </s:if>
	            </s:iterator>
        	</ul>
        </div>       
        <!--            
              CONTENT 
         --> 
        <!-- ===================================中间显示的部分（主体）========================================= -->
	
		<div id="content" class="white">
			   <div class="bloc">
			   <div class="title"></div>
			    <div class="content dashboard">
			        <div class="center" style="text-align: center;">
			            <a href="linkAction_list" class="shortcut">
			                <img src="img/contact.png" alt="" width="48" height="48"/>
			                通讯录
			            </a>
			            <a href="usermarkAction_list?unique_id=${sessionScope.user1.unique_id }" class="shortcut last">
			                <img src="img/page.png" alt="" width="48" height="48" />
			                我的便签
			            </a>
			            <a href="forum_queryAllForum.action?type=0" class="shortcut">
			                <img src="img/baohu.ico" alt="" width="48" height="48" />
			                论坛板块
			            </a>
			            <a href="applicationAction_list" class="shortcut">
			                <img src="img/rutun.ico" alt="" width="48" height="48" />
			                起草申请
			            </a>
			            <a href="applicationAction_myApplicationList" class="shortcut last">
			                <img src="img/liuchen.ico" alt="" width="48" height="48" />
			                申请列表
			            </a>
			            <a href="applicationAction_myTaskList" class="shortcut last">
			                <img src="img/icon.png" alt="" width="48" height="48" />
			                待我审批
			            </a>
			            <a href="#" class="shortcut last">
			                <img src="img/dep.ico" alt="" width="48" height="48" />
			                我的邮件
			            </a>
			            <a href="#" class="shortcut last">
			                <img src="img/user.ico" alt="" width="48" height="48" />
			                我的任务
			            </a>
			            <div class="cb"></div>
			        </div>
			        <p></p>
			    </div>
			</div>  
			
			<div class="bloc">
			    <div class="title">
			       	 选择申请模板
			    </div>
			    <div class="content">
			        <table>
			            <thead>
			                <tr>
								<th>模板名称</th>
								<th>操作</th>
			                </tr>
			            </thead>
			            <tbody>
			                <c:forEach var="templateList" items="${requestScope.templateList }">
								<tr>
									<td>
										<a title="${templateList.template_name} 申请" href="applicationAction_look?applicationTemplateID=${templateList.unique_id}"><img src="${pageContext.request.contextPath}/img/icons/menu/dark/word.png" />
											<font style="font-weight: bold;font-size: 18px;">${templateList.template_name}</font>
										</a>
									</td>
				                    <td class="actions">
										<a href="templateAction_download?unique_id=${templateList.unique_id }" title="查看">
				                    		<img src="img/icons/actions/search.png" alt="查看" />
				                    	</a>
				                    </td>
								</tr>
							</c:forEach>
			         </tbody>
			        </table>
			    </div>
			</div>
        </div>
</body>
</html>